import request from '#/utils/requestAbort.js';

export function queryCookies(id: number) {
  return request(`/generation-common/marketAccountManagement/getLoginInfo/${id}`, {
    method: 'GET',
  });
}

export function pageAccountInfo(data: any) {
  return request('/generation-common/marketAccountManagement/pageAccountInfo', {
    method: 'POST',
    data,
  });
}

export function addAccountInfo(data: any) {
  return request('/generation-common/marketAccountManagement/add', {
    method: 'POST',
    data,
  });
}

export function editAccountInfo(data: any) {
  return request('/generation-common/marketAccountManagement/update', {
    method: 'POST',
    data,
  });
}

export function delAccountInfo(id: string) {
  return request(`/generation-common/marketAccountManagement/delete/${id}`, {
    method: 'GET',
  });
}

export function getSchedulingNameList(data: any) {
  return request('/generation-common/marketAccountManagement/getSchedulingNameList', {
    method: 'POST',
    data,
  });
}

export function getUserNameList(data: any) {
  return request('/generation-common/marketAccountManagement/getUserNameList', {
    method: 'POST',
    data,
  });
}

export function loginOut(data: any) {
  return request(`/generation-common/marketAccountManagement/loginOut`, {
    method: 'POST',
    data,
  });
}

export function exportListData(data: any) {
  return request(`/generation-common/marketAccountManagement/export`, {
    method: 'POST',
    data,
    responseType: 'blob',
  });
}

export function plugInDownload() {
  return request(`/generation-common/marketAccountManagement/plugInDownload`, {
    method: 'GET',
    responseType: 'blob',
  });
}

export function instructionDocument() {
  return request(`/generation-common/marketAccountManagement/instructionDocument`, {
    method: 'GET',
    responseType: 'blob',
  });
}
